/**
 * 
 */
package com.skyme.automation.generate.common.util;

/**
 * 格式化信息
 * @author zhangfeng
 *
 */
public class Format {
	
	public static String null2blank(String str) {
		if (str == null) {
			return "";
		}
		return str;
	}
	
	public static String escapeSQL(String str) {
		str = str.replaceAll("'", "''");
		str = str.replaceAll("\\\\", "\\\\\\\\");

		return str;
	}

	public static String toString(Object value) {
		if (value == null) {
			return "";
		}

		return String.valueOf(value);
	}

}
